1. Field of Invention
This invention relates to methods for storing computer programs and methods for initiating program control.
2. Description of Related Art
The majority of computer peripherals, such as image scanners, modems, and printers, typically employ an on-board controlling system including alterable memory, such as random access memory (RAM), which may be volatile and/or non-volatile, and nonalterable memory, such as read only memory (ROM), and various hardware circuits that facilitate firmware transfer. One drawback to early peripheral devices was the inability to upgrade and improve the software within the devices without requiring a service technician to physically remove the old programs contained on the non-alterable memory and install a new non-alterable memory containing the upgraded software.
As non-volatile memories improved, especially flash electrically erasable programmable read only memory (EEPROM), hardware vendors developed techniques to remotely download and store upgraded software onto the peripherals. The methods typically involved providing the peripheral device with the new software, and then directing the on-board controller in the peripheral device to store the new program within the non-volatile alterable memory. The software and the storing of such software in non-alterable memory are commonly referred to in combination as firmware.
However, one drawback to this method for downloading and storing the new firmware is that data and programs could be corrupted, thus rendering the system useless, if, during this firmware upgrade routine, the process is interrupted by, for example, an unexpected loss of power. Often, when this occurs, the only remedy to fix the peripheral is to deploy a service technician to physically replace the non-volatile alterable memory or even to replace an entire circuit board.
This invention provides systems, methods and architectures that enable recoverable software upgrading of software contained in a non-volatile alterable memory.
This invention separately provides a firmware architecture that allows recovery from failed firmware upgrading procedures.
This invention separately provides a firmware architecture that allows a firmware upgrade without removing the upgraded firmware.
In various exemplary embodiments of this invention, a system containing firmware includes memory storing a bootstrap program. The system further includes a non-volatile alterable memory having at least two firmware memory spaces. The first one of the firmware memory spaces stores a current firmware program.
When that firmware program is to be upgraded, the upgrade firmware is received and stored in a second one of the at least two memory spaces. After the upgrade firmware is completely received and stored in that second memory space, the original firmware in the first memory space is erased or otherwise marked as no longer being valid. Thus, the only valid firmware is then the upgrade firmware in the second memory space. The bootstrap program accesses which ever memory space contains valid firmware.